package com.tanhua.server;

import cn.hutool.system.UserInfo;
import com.tanhua.dubbo.api.UserApi;
import com.tanhua.interceptor.UserHolder;
import com.tanhua.model.domain.User;
import com.tanhua.model.vo.HuanXinUserVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

@Service
public class HuanXinService {
    @DubboReference
    private UserApi userApi;


    public HuanXinUserVo findById() {
        User user = userApi.findByUserId(UserHolder.getUserId());
        HuanXinUserVo huanXinUserVo = new HuanXinUserVo();

        huanXinUserVo.setUsername(user.getHxUser());
        huanXinUserVo.setPassword(user.getHxPassword());
        return huanXinUserVo;
    }
}
